﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using LTJ.Entity;
using LTJ.Common;
using LTJ.Config;
using LTJ.FrameWork;

namespace LTJ.WebPage.UserManage.route
{
    /// <summary>
    /// 批量价格修改
    /// </summary>
    public partial class routepriceset : UserPage
    {
        protected string idslist = SASRequest.GetString("ids");

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 价格修改
        /// </summary>
        protected void editroute_Click(object sender, EventArgs e)
        {
            RouteBaseInfo rbinfo = new RouteBaseInfo();
            rbinfo._20GP = _20GPprice.Text;
            rbinfo._40GP = _40GPprice.Text;
            rbinfo._40HQ = _40HQprice.Text;
            rbinfo.YAS = USD_YAS_20GP.Text + "," + USD_YAS_40GP.Text + "," + USD_YAS_40HQ.Text;
            rbinfo.CIC = USD_CIC_20GP.Text + "," + USD_CIC_40GP.Text + "," + USD_CIC_40HQ.Text;
            rbinfo.EBS = USD_EBS_20GP.Text + "," + USD_EBS_40GP.Text + "," + USD_EBS_40HQ.Text;
            rbinfo.PSS = USD_PSS_20GP.Text + "," + USD_PSS_40GP.Text + "," + USD_PSS_40HQ.Text;
            rbinfo.OTHER = USD_OTHER_20GP.Text + "," + USD_OTHER_40GP.Text + "," + USD_OTHER_40HQ.Text;
            rbinfo.CAF = USD_CAF_20GP.Text + "," + USD_CAF_40GP.Text + "," + USD_CAF_40HQ.Text;
            rbinfo.BAF = USD_BAF_20GP.Text + "," + USD_BAF_40GP.Text + "," + USD_BAF_40HQ.Text;
            rbinfo.AMS_ENS = USD_AMS_ENS.Text;
            rbinfo.QFF = RMB_QFF_20GP.Text + "," + RMB_QFF_40GP.Text + "," + RMB_QFF_40HQ.Text;
            rbinfo.DCF = RMB_DCF_20GP.Text + "," + RMB_DCF_40GP.Text + "," + RMB_DCF_40HQ.Text;
            rbinfo.XSF = RMB_XSF.Text;
            rbinfo.THC = RMB_THC_20GP.Text + "," + RMB_THC_40GP.Text + "," + RMB_THC_40HQ.Text;
            rbinfo.ECR = RMB_ECR_20GP.Text + "," + RMB_ECR_40GP.Text + "," + RMB_ECR_40HQ.Text;
            rbinfo.RMB_EBS = RMB_EBS_20GP.Text + "," + RMB_EBS_40GP.Text + "," + RMB_EBS_40HQ.Text;
            rbinfo.DOC = RMB_DOC.Text;
            rbinfo.RMB_CIC = RMB_CIC_20GP.Text + "," + RMB_CIC_40GP.Text + "," + RMB_CIC_40HQ.Text;
            rbinfo.isconfim = SASRequest.GetInt("alonecheck", 0);

            RouteBases.UpdateBatchRoutePrice(rbinfo, idslist);
            OpLogs.LogRoutesPriceEdit(userid, username, idslist);
            base.RegisterStartupScript("PAGE", "parent.document.getElementById('reclick').click();parent.Lightview.hide();");
        }

        #region Web 窗体设计器生成的代码

        override protected void OnInit(EventArgs e)
        {
            InitializeComponent();
            base.OnInit(e);
        }

        private void InitializeComponent()
        {
            editroute.Click += new EventHandler(editroute_Click);
        }

        #endregion
    }
}